package com.edu.learning.test;

import java.util.ArrayList;
import java.util.List;

/**
 * jvisualvm
 *
 * jconsole
 *
 * @author ll
 * @Date 2017/12/19 21:22
 */
public class StringOomMock {
    static String base = "string";

    public static void main(String[] args) throws InterruptedException {
        //List<String> list = new ArrayList<String>();
        for (int i = 0; i < Integer.MAX_VALUE; i++) {
            System.out.println(i);
            Thread.sleep(200);
            String str = base + base;
            base = str;
            //list.add(str.intern());
        }
    }
}
